<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 同时调用三个接口或者多个接口 多个接口都要返回200的成功才能允许用户的操作 -->
    <!-- Prmoise.all -->
    <script>
        let p1  = new Promise((resolve,reject)=>{
            resolve("OK")
        })
        let p2 = Promise.resolve("qweqwe");
        let p3 = Promise.reject("OK");
        let result = Promise.all([p1,p2,p3]);
        // console.log(result)//全部成功就返回全部成功的结果 只要有一个失败就只返回失败的结果
    </script>
</body>
</html>